<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <base href="<%=basePath%>">
    <title>addGoods.jsp</title>
    <link href="css/admin/common.css" type="text/css" rel="stylesheet">
</head>
<body>
<c:if test="${flag.equals(\"insert\")}">
    <%--@elvariable id="notice" type="com.hotel.reservation.po.NoticePo"--%>
    <form:form action="/admin/notice/insertANotice" method="post" modelAttribute="notice">
        <table border=1 style="border-collapse: collapse">
            <caption>
                <font size=4 face=华文新魏>添加资讯</font>
            </caption>
            <tr>
                <td><font size=4 face=华文新魏>资讯标题<font color="red">*</font></font></td>
                <td>
                    <form:input path="noticeTitle"/>
                </td>
            </tr>
            <tr>
                <td><font size=4 face=华文新魏>资讯详情<font color="red">*</font></font></td>
                <td>
                    <form:input path="noticeContent" cssStyle="width: 250px ;height: 100px"/>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <input type="submit" value="提交"/>
                </td>
                <td align="left">
                    <input type="reset" value="重置"/>
                </td>
            </tr>
        </table>
    </form:form>
</c:if>
<c:if test="${flag.equals(\"update\")}">
    <%--@elvariable id="notice" type="com.hotel.reservation.po.NoticePo"--%>
    <form:form action="/admin/notice/updateANotice" method="post" modelAttribute="notice">
        <table border=1 style="border-collapse: collapse;margin-left: 170px">
            <caption>
                <font size=4 face=华文新魏>修改资讯</font>
            </caption>
            <tr>
                <td><font size=4 face=华文新魏>资讯编号<font color="red">*</font></font></td>
                <td>
                    <input name="noticeId" id="noticeId" value="${notice.noticeId}" readonly="readonly"/>
                </td>
            </tr>
            <tr>
                <td><font size=4 face=华文新魏>资讯标题<font color="red">*</font></font></td>
                <td>
                    <form:input path="noticeTitle"/>
                </td>
            </tr>
            <tr>
                <td><font size=4 face=华文新魏>资讯详情<font color="red">*</font></font></td>
                <td>
                    <form:input path="noticeContent" cssStyle="width: 250px ;height: 100px"/>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <input type="submit" value="提交"/>
                </td>
                <td align="left">
                    <input type="reset" value="重置"/>
                </td>
            </tr>
        </table>
    </form:form>
</c:if>

</body>
</html>
